package com.touch.graphics;
/**
 * JGLUV represents the UV mapping of an object.
 * @author Homicidal Monkey
 * @version 10.1.9
 * @since r419
 * @see com/touch/Licence
 */
public class UV implements Cloneable
{
	/** 
	 * U value mapping of the Texture 
	 * @since r461
	 */
	public float u;
	/**
	 *  V value mapping of the Texture
	 *  @since r461 
	 */
	public float v;
	/**
	 * Constructs the UV definition of the mapping.
	 * @param u U value to set
	 * @param v V value to set
	 * @since r461
	 */
	public UV(final float u, final float v)
	{
		//sets the U value
		this.u = u;
		//sets the V value
		this.v = v;
	}
	/** 
	 * Overrides the "String toString()" method to display
	 * the Object's UV mapping.
	 * @return String description of the JGLUV object
	 * @since r461
	 */
	public String toString()
	{
		/*returns the UV mapping as a String. 
		* example: "[1.0, 1.0]" */
		return "[" + this.u + ", " + this.v + "]";		
	}
	public UV clone()
	{
		final UV clone = new UV(this.u, this.v);
		return clone;
	}
}
